package com.ruoyi.liangshi.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.sql.LambdaQueryWrapperX;
import com.ruoyi.liangshi.domain.ArchItem;
import com.ruoyi.liangshi.domain.AtchItem;
import com.ruoyi.liangshi.domain.BsOrder;
import com.ruoyi.liangshi.domain.GdAtchItem;
import com.ruoyi.liangshi.mapper.AtchItemMapper;
import com.ruoyi.liangshi.mapper.GdArchPointMapper;
import com.ruoyi.liangshi.service.IArchItemService;
import com.ruoyi.liangshi.vo.query.BiBsKscMonthChartData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * @Author LiuJin
 * @Date: Create in 2023-11-14 11:43
 * @Description: this class is
 */
@Service
public class ArchItemServiceImpl extends ServiceImpl<AtchItemMapper, ArchItem> implements IArchItemService {

    @Autowired
    private AtchItemMapper atchItemMapper;


    @Override
    public Map<Long, ArchItem> selectAtchItemMap() {
        LambdaQueryWrapperX<ArchItem> wrapper  = new LambdaQueryWrapperX<ArchItem>();
        wrapper.eq(ArchItem::getIsEnable, "t");
        List<ArchItem> archItemList = atchItemMapper.selectList(wrapper);
        Map<Long, ArchItem> archItemMap = archItemList.stream().collect(Collectors.toMap(ArchItem::getId, (p) -> p));
        return  archItemMap ;
    }
}
